package tzhomestudio.framework.shared.utils;

import java.util.Random;
import java.util.UUID;

/**
 * @author Timur Zolotuhin (tzolotuhin@parallels.com)
 */
public class RandomUtils {
    // Constants
    private static final char[] englishAlphabet =  "abcdefghijklmnopqrstuvwxyz".toCharArray();

    // Main data
    private static final Random random = new Random();

    public static String generateEnglishRandomWord(int length) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < length; i++) {
            char c = englishAlphabet[random.nextInt(englishAlphabet.length)];
            sb.append(c);
        }
        return sb.toString();
    }

    public static UUID generateRandomUUID() {
        return UUID.randomUUID();
    }
}
